Question: Find the sum of the $x$-coordinates of the solutions to the system of equations $y=|x^2-6x+5|$ and $y=\frac{29}{4}-x$.
Solution: The quadratic $x^2-6x+5$ factors as $(x-5)(x-1)$, so it crosses the $x$-axis at $1$ and $5$. Since the leading coefficient is positive, it opens upwards, and thus the value of the quadratic is negative for $x$ between $1$ and $5$. Thus if $x\le 1$ or $x\ge 5$, we have $|x^2-6x+5|=x^2-6x+5$. We can solve the system in this range by setting the $y$-values equal, so

\begin{align*}
x^2-6x+5&=\frac{29}{4}-x\\
x^2-5x+\frac{20}{4}-\frac{29}{4}&=0\\
x^2-5x-\frac{9}{4}&=0.
\end{align*}Thus by the quadratic formula, $$x=\frac{-(-5)\pm\sqrt{(-5)^2-4(\frac{-9}{4})(1)}}{2(1)}=\frac{5\pm\sqrt{25+9}}{2}=\frac{5\pm\sqrt{34}}{2}.$$A quick check shows that both solutions have either $x<1$ or $x>5$, so they are both valid in this system. We do not need to find the corresponding $y$-values since the problem asks only for the sum of the $x$-coordinates.

If $1\le x\le 5$, we know $|x^2-6x+5|=-x^2+6x-5$. Solving the system as before, we have

\begin{align*}
\frac{29}{4}-x&=-x^2+6x-5\\
x^2-7x+\frac{29}{4}+\frac{20}{4}&=0\\
x^2-7x+\frac{49}{4}&=0\\
(x-\frac{7}{2})^2&=0\\
x&=\frac{7}{2}.
\end{align*}Checking, this value is indeed between $1$ and $5$, so it is allowable. Thus the possible $x$-values are $\frac{5+\sqrt{34}}{2}$, $\frac{5-\sqrt{34}}{2}$, and $\frac{7}{2}$. Their sum is $$\frac{5+\sqrt{34}}{2}+\frac{5-\sqrt{34}}{2}+\frac{7}{2}=\frac{5+5+7}{2}=\boxed{\frac{17}{2}}.$$